package it.cst.entity.service;

import it.cst.entity.Role;
import it.cst.entity.dao.RoleDAO;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class RoleServiceImpl implements RoleService{
	@Autowired
	private RoleDAO roleDAO;
	

	public RoleDAO getRoleDAO() {
		return roleDAO;
	}

	public void setRoleDAO(RoleDAO roleDAO) {
		this.roleDAO = roleDAO;
	}

	@Override
	public void addRole(Role role) {
		// TODO Auto-generated method stub
		
	}

	@Transactional
	public List<Role> listRole() {
		return roleDAO.listRole();
	}

	@Override
	public void removeRole(Integer id) {
		// TODO Auto-generated method stub
		
	}

	@Transactional
	public Role getRole(String roleName) {
		return roleDAO.getRole(roleName);
	}

}
